Terms and factors of algebraic expressions